﻿using ChatForum.Client.AccountServiceProxy;
using ChatForum.Client.ForumServiceProxy;
namespace ChatForum.Client
{
    public class ServiceHelper
    {
        private static ServiceHelper instance;
        private static object _lock = new object();
        private ServiceHelper() { }
        public static ServiceHelper Instance
        {
			get
			{
				lock (_lock)
				{
					if (instance == null)
						instance = new ServiceHelper();
				}
				return instance;
			}
        }

		private AccountServiceClient accountServiceClient;
		public AccountServiceClient AccountService
		{
			get
			{
				if (accountServiceClient == null)
					accountServiceClient = new AccountServiceClient();
				return accountServiceClient;
			}
		}
		private ForumServiceClient forumServiceClient;
		public ForumServiceClient ForumService
		{
		    get
		    {
		        if (forumServiceClient == null)
		            forumServiceClient = new ForumServiceClient();
		        return forumServiceClient;
		    }
		}
    }
}
